#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>  
int main(void){
	char ch;
	ch = getchar();
	while (ch != '\n'){
		if (ch >= 'A'&&ch <= 'Z'){
			if (ch == 'Z'){
				ch = 'a';
			}
			else
				ch = ch - 'A' + 'a' + 1;

		}
		else if (ch >= 'a'&&ch <= 'z'){
			if (ch == 'z'){
				ch = 'A';
			}
			else
				ch = ch - 'a' + 'A' + 1;

		}
		putchar(ch);
		ch = getchar();
	}
	return 0;
}